#include <stdio.h>
int Factoria(int n)
{
	int m = 1;
	while (n > 1)
	{
		m *= n;
		n--;
	}
	return m;
}
int main()
{
	int n = 0;
	scanf_s("%d", &n);
	printf("%d", Factoria(n));
	return 0;
}